import Axios from "axios";
import {url} from "../util/"
export default{
    login:async({username,password})=>{
      let res = await Axios({
            method: "GET",
            url: url+"/users/login",
            params: {
              username,
              password
            }
          })
          return res.data
    },
    Reg:async({username,password})=>{
      let res = await Axios({
        method: "post",
        url: url+"/users/reg",
        data: {
          username,
          password
        }
          })
          return res.data
    },
    isUse:async(username)=>{
      let res = await Axios({
        method: "post",
        url: url+"/users/filtr",
        data: {
          username: `${username}`
        }
          })
          return res.data
    }
}